/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package thing;

/**
 *
 * @author Tharen
 */
public class Worlds extends Object{

    private String image;
    private String worldName;
    private String filePath;
    private String type;
    private String description;
    private Boolean modsRequired;

    /**
     * Constructor if only given one String.
     *
     * @param worldName Name of the world being created. This will be displayed
     * in the list.
     */
    public Worlds(String worldName) {
        this.worldName = worldName;
    }
    /**
     * Main constructor.
     * 
     * @param worldName Name of the world. This will be displayed in the list.
     * @param type Type of world this is. e.g. Tower defense, creative,
     * @param modsRequired  Boolean of whether or not mods are required. Null is not acceptable.
     * @param image An image to be displayed in the main window.
     * @param description A description of what the map is about.
     */
    public Worlds(String worldName, String type, boolean modsRequired, String image, String description, String filePath) {
        this.worldName = worldName;
        this.filePath = filePath;
        this.type = type;
        this.description = description;
        this.modsRequired = modsRequired;
        this.image = image;
    }

    public void setType(String type) {
        this.type = type;
    }

    public void setModsRequired(boolean modsRequired) {
        this.modsRequired = modsRequired;
    }

    public void setFilePath(String filePath) {
        this.filePath = filePath;
    }

    public Boolean isModsRequired() {
        return modsRequired;
    }
    /**CURRENTLY: Busted.
     * 
     * @return Returns the file path of this world.
     */
    public String getFilePath() {
        return filePath;
    }

    public String getImage() {
        return image;
    }

    public void setImage(String image) {
        this.image = image;
    }

    public String getType() {
        return type;
    }
    /**CURRENTLY: In Progress
     * 
     * @return Returns the 5 main attributes of this world.
     */
    public String[] list(){
        String[] temp = new String[5];
        temp[0] = worldName;
        temp[1] = type;
        temp[2] = modsRequired.toString();
        temp[3] = image;
        temp[4] = description;
        return temp;
    }
    
    public String getWorldName() {
        return worldName;
    }

    public void setWorldName(String worldName) {
        this.worldName = worldName;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    /**
     * Forces the return of the name of the world instead of useless.
     *
     * @return String of the worlds name.
     */
    @Override
    public String toString() {
        return worldName;
    }
}